package win.larryzeal.spring.jms;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import win.larryzeal.spring.jms.config.JmsConfig;
import win.larryzeal.spring.jms.service.JmsProducerService;

/**
 * Hello world!
 */
public class Main {
    public static void main(String[] args) throws InterruptedException{
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(JmsConfig.class);
        // JmsConsumerService consumerService = applicationContext.getBean(JmsConsumerService.class);
        Thread.sleep(3000L);
        JmsProducerService producerService = applicationContext.getBean(JmsProducerService.class);
        producerService.sendMessage();
        producerService.sendMessage2();
    }
}
